<template>
  <p v-for="(value, key) in user" :key="key">
    属性名是：{{ key }} --- 属性值是：{{ value }}
  </p>
</template>

<script setup>
  const user = {
    id: 11,
    name: '小明',
    gender: '男'
  }
</script>

<style scoped>
</style>